package com.example.activity;

import android.app.Activity;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

import com.aliyun.alink.business.login.IOpenLoginAdaptor;
import com.aliyun.alink.business.login.OpenLoginBusiness;
import com.aliyun.alink.sdk.net.anet.wsf.WSFConfigure;
import com.aliyun.alink.sdk.net.anet.wsf.WSFNet;
import com.aliyun.alink.utils.ALog;
import com.example.openademo.R;


/**
 * Created by ASUS on 2016/7/26.
 */
public class Login_DemoActivity extends Activity {

    public Button btnLogin;
    public TextView username;
    public TextView password;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.login_demo);
        super.onCreate(savedInstanceState);
        btnLogin = (Button) findViewById(R.id.loginBtn);
        btnLogin.setOnClickListener(new login());
        initAliSDK();
    }

    class login implements View.OnClickListener {
        @Override
        public void onClick(View view) {
            username = (TextView) findViewById(R.id.userName);
            password = (TextView) findViewById(R.id.passWord);

            String uname = username.getText().toString();
            String pwd   = password.getText().toString();
            if(uname.equals("") || pwd.equals("")){
                Toast.makeText(Login_DemoActivity.this,"输入用户名密码",Toast.LENGTH_SHORT).show();
            }else{
                Toast.makeText(Login_DemoActivity.this,"用户名:"+uname+"密码："+pwd,Toast.LENGTH_SHORT).show();
            }

        }
    }

    public void  initAliSDK(){

    }
}
